<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="RestfulClient,org.opensocial.client.restful.RestfulClient,callAsync,callSync,initFeatureBook,registerCallback,unregisterCallback" name="keywords">
<title>org.opensocial.client.restful.RestfulClient</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'RestfulClient - OpenSocial Actionscript 3.0 Client Library Documentation';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">OpenSocial Actionscript Client Library</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?org/opensocial/client/restful/RestfulClient.html&amp;org/opensocial/client/restful/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;RestfulClient</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class RestfulClient"); titleBar_setSubNav(false,false,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">org.opensocial.client.restful</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class RestfulClient</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">RestfulClient <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../../images/inherit-arrow.gif"> <a href="../core/OpenSocialClient.html">OpenSocialClient</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
</table>
<p></p>
 RESTful client is for the flash app which is running on the iframe which serving from app's own
 server. So the flash swf object can talk to the app server in secure way by constrict security
 policy (e.g. Security.allowDomain("your-app-server.com")). So the swf can receive keys from the
 app server and talk to the container api endpoint via RESTful format.
  <p>
 This package only contains the classes related to RESTful framework, which is parallel to the
 javascript wrapper client in the package <code>org.opensocial.client.jswrapper</code>.
 </p>
 <p>
 Those common basic data types are all in <code>org.opensocial.client.base</code> package, and
 utilily classes are <code>org.opensocial.client.util</code> package. Both javascript wrapper
 client and this restful client will share them.
 </p>
  <p></p>
<br>
<hr>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<div class="showHideLinks">
<div class="hideInheritedMethod" id="hideInheritedMethod">
<a onclick="javascript:setInheritedVisible(false,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Methods</a>
</div>
<div class="showInheritedMethod" id="showInheritedMethod">
<a onclick="javascript:setInheritedVisible(true,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Methods</a>
</div>
</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#RestfulClient()">RestfulClient</a>()</div>
<div class="summaryTableDescription">
   </div>
</td><td class="summaryTableOwnerCol">RestfulClient</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="../core/OpenSocialClient.html#addFeature()">addFeature</a>(featureName:String, isAsync:Boolean, reqParser:Function = null, resParser:Function = null):void</div>
<div class="summaryTableDescription">
   Adds new feature to this client.</div>
</td><td class="summaryTableOwnerCol"><a href="../core/OpenSocialClient.html">OpenSocialClient</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#callAsync()">callAsync</a>(featureName:String, callback:Function, ... args):void</div>
<div class="summaryTableDescription">
   
   Executes the feature asynchronously.</div>
</td><td class="summaryTableOwnerCol">RestfulClient</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="../core/OpenSocialClient.html#callBatch()">callBatch</a>(requests:Dictionary, handler:Function):void</div>
<div class="summaryTableDescription">
   Executes batch request.</div>
</td><td class="summaryTableOwnerCol"><a href="../core/OpenSocialClient.html">OpenSocialClient</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#callSync()">callSync</a>(featureName:String, ... args):*</div>
<div class="summaryTableDescription">
   
   Executes the feature synchronously.</div>
</td><td class="summaryTableOwnerCol">RestfulClient</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="../core/OpenSocialClient.html#checkFeature()">checkFeature</a>(featureName:String):<a href="../core/Feature.html">Feature</a>
</div>
<div class="summaryTableDescription">
   Gets and checks the feature by its name.</div>
</td><td class="summaryTableOwnerCol"><a href="../core/OpenSocialClient.html">OpenSocialClient</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#registerCallback()">registerCallback</a>(callbackName:String, callback:Function):void</div>
<div class="summaryTableDescription">
   
   Registers a callback handler on this client.</div>
</td><td class="summaryTableOwnerCol">RestfulClient</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="../core/OpenSocialClient.html#removeFeature()">removeFeature</a>(featureName:String):<a href="../core/Feature.html">Feature</a>
</div>
<div class="summaryTableDescription">
   Removes the feature by its name.</div>
</td><td class="summaryTableOwnerCol"><a href="../core/OpenSocialClient.html">OpenSocialClient</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#unregisterCallback()">unregisterCallback</a>(callbackName:String):void</div>
<div class="summaryTableDescription">
   
   Unregisters a callback handler from this client.</div>
</td><td class="summaryTableOwnerCol">RestfulClient</td>
</tr>
</table>
</div>
<a name="protectedMethodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Methods</div>
<div class="showHideLinks">
<div class="hideInheritedProtectedMethod" id="hideInheritedProtectedMethod">
<a onclick="javascript:setInheritedVisible(false,'ProtectedMethod');" href="#protectedMethodSummary" class="showHideLink"><img src="../../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Protected Methods</a>
</div>
<div class="showInheritedProtectedMethod" id="showInheritedProtectedMethod">
<a onclick="javascript:setInheritedVisible(true,'ProtectedMethod');" href="#protectedMethodSummary" class="showHideLink"><img src="../../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Protected Methods</a>
</div>
</div>
<table id="summaryTableProtectedMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="hideInheritedProtectedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="../core/OpenSocialClient.html#initCallbackManager()">initCallbackManager</a>():void</div>
<div class="summaryTableDescription">
   Initializes the feature book.</div>
</td><td class="summaryTableOwnerCol"><a href="../core/OpenSocialClient.html">OpenSocialClient</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#initFeatureBook()">initFeatureBook</a>():void</div>
<div class="summaryTableDescription">
   
   Initializes the feature book.</div>
</td><td class="summaryTableOwnerCol">RestfulClient</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="RestfulClient()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">RestfulClient</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function RestfulClient()</code><p>
   </p></div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="callAsync()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">callAsync</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public override function callAsync(featureName:String, callback:Function, ... args):void</code><p>
   
   Executes the feature asynchronously.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">featureName</span>:String</code> &mdash; The name of the async feature.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">callback</span>:Function</code> &mdash; The callback to handle the response.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code>... <span class="label">args</span></code> &mdash; The request parameters.
      </td>
</tr>
</table>
</div>
<a name="callSync()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">callSync</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public override function callSync(featureName:String, ... args):*</code><p>
   
   Executes the feature synchronously.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">featureName</span>:String</code> &mdash; The name of the sync feature.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code>... <span class="label">args</span></code> &mdash; The request parameters
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>*</code> &mdash; The response value.
   </td>
</tr>
</table>
</div>
<a name="initFeatureBook()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">initFeatureBook</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected override function initFeatureBook():void</code><p>
   
   Initializes the feature book. This method should be overriden for customizing features.
   </p></div>
<a name="registerCallback()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">registerCallback</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public override function registerCallback(callbackName:String, callback:Function):void</code><p>
   
   Registers a callback handler on this client.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">callbackName</span>:String</code> &mdash; The name or id of the callback.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">callback</span>:Function</code> &mdash; The callback function.
      </td>
</tr>
</table>
</div>
<a name="unregisterCallback()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">unregisterCallback</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public override function unregisterCallback(callbackName:String):void</code><p>
   
   Unregisters a callback handler from this client.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">callbackName</span>:String</code> &mdash; The name or id of the callback.
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright">2010 OpenSocial</center>
</div>
</body>
</html>
<!--2010 OpenSocial-->
